Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Welcome to Cal.diy, @hbjORbj! Thanks for opening this pull request. A few things to keep in mind:
A maintainer will review your PR soon. Thanks for contributing! |
📝 WalkthroughWalkthroughThe PR makes test execution conditional: two backend e2e suites switch between 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/api/v2/src/platform/calendars/controllers/calendars.controller.e2e-spec.ts (1)
51-53: Scope env-based skipping to Google-only tests, not the full suite.This currently disables all calendar e2e tests when
GOOGLE_API_CREDENTIALSis missing, including non-Google scenarios. Keep the top-level suite active and gate only Google-dependent cases.♻️ Suggested refactor
-const describeCalendars = process.env.GOOGLE_API_CREDENTIALS ? describe : describe.skip; - -describeCalendars("Platform Calendars Endpoints", () => { +const hasGoogleCredentials = Boolean(process.env.GOOGLE_API_CREDENTIALS?.trim()); +const describeGoogleCalendars = hasGoogleCredentials ? describe : describe.skip; + +describe("Platform Calendars Endpoints", () => {// Then wrap only Google-specific specs: describeGoogleCalendars("Google calendar flows", () => { // google connect/check/busy-times tests });🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/api/v2/src/platform/calendars/controllers/calendars.controller.e2e-spec.ts` around lines 51 - 53, The top-level suite is being skipped via describeCalendars (using process.env.GOOGLE_API_CREDENTIALS ? describe : describe.skip), which disables all calendar e2e tests; instead keep the main describe("Platform Calendars Endpoints", ...) always active and only gate Google-specific tests by creating a conditional wrapper (e.g., describeGoogleCalendars or using process.env.GOOGLE_API_CREDENTIALS ? describe : describe.skip) around the Google-only specs (connect/check/busy-times) so non-Google scenarios still run; update the file to remove the describeCalendars wrapper around the entire suite and apply the conditional wrapper only to the Google-specific describe blocks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@apps/api/v2/src/platform/calendars/controllers/calendars.controller.e2e-spec.ts`:
- Around line 51-53: The top-level suite is being skipped via describeCalendars
(using process.env.GOOGLE_API_CREDENTIALS ? describe : describe.skip), which
disables all calendar e2e tests; instead keep the main describe("Platform
Calendars Endpoints", ...) always active and only gate Google-specific tests by
creating a conditional wrapper (e.g., describeGoogleCalendars or using
process.env.GOOGLE_API_CREDENTIALS ? describe : describe.skip) around the
Google-only specs (connect/check/busy-times) so non-Google scenarios still run;
update the file to remove the describeCalendars wrapper around the entire suite
and apply the conditional wrapper only to the Google-specific describe blocks.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 05c75a70-77da-4369-8b2e-28fa81429731
📒 Files selected for processing (1)
apps/api/v2/src/platform/calendars/controllers/calendars.controller.e2e-spec.ts
Uh oh!
There was an error while loading. Please reload this page.